# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

# NOTE: Please do not push changes to this package without requesting a test run
# across all supported architectures.  Untested changes to this package may be
# reverted at any time, at the core team's discretion.

pkgname=guile
pkgver=2.0.14
pkgrel=2
pkgdesc="Guile is a portable, embeddable Scheme implementation written in C"
url="https://www.gnu.org/software/guile/"
arch="all"
options="!check"  # Requires actual LC_COLLATE and LC_MONETARY support.
license="LGPL-3.0+, GPL-3.0+"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
makedepends="gmp-dev libtool ncurses-dev texinfo libunistring-dev libffi-dev
	gc-dev"
depends=
depends_dev="guile gc-dev"
install=
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
	0002-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
	"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-error-on-warning \
		--disable-static
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/lib/charset.alias
}

sha512sums="d69c9bdf589fedcc227f3203012f6ed11c327cef3a0147d8e016fe276abecdb4272625efe1d0c7aa68219fe8f29bbced44089a4b479e4eafe01976c6b2b83633  guile-2.0.14.tar.gz
b1c309cc07830ff1741ef88857f8099187b449580e8d57862886abc367ef1accc5a35636d81eee09247f13d3a751cdc8909fdea05368d3d509bd2039ce06d078  0002-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch"
